package com.cntcdt.api.db.model.base;

import java.io.Serializable;
import java.sql.ResultSet;
import java.util.Date;

/**
 * 这是cdt_chongdianbao的数据传输对象基类,直接与表对应<br>
 */
public abstract class ChongdianbaoModelBase  implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 属性:id<br>
     */
    private Integer id ;
    /**
     * 属性:deviceId<br>
     */
    private Integer deviceId ;
    /**
     * 属性:设备号<br>
     * 含义:设备号<br>
     */
    private String imei ;
    /**
     * 属性:借出次数<br>
     * 含义:借出次数<br>
     */
    private Integer checkout ;
    /**
     * 属性:1表示可借  2借出 3表示损坏<br>
     * 含义:1表示可借  2借出 3表示损坏<br>
     */
    private Integer status ;
    /**
     * 属性:目前再借的人<br>
     * 含义:目前再借的人<br>
     */
    private Integer checkoutUserId ;
    /**
     * 属性:addTime<br>
     */
    private Date addTime ;
    /**
     * 属性:updateTime<br>
     */
    private Date updateTime ;

    private Integer capacity ;//电量
    
    private String devicePosition;//充电宝的位置 
    
    private Integer vtmp;//充电宝的温度状态
    
    private Integer vstatus;//充电宝仓的状态
    
    private Integer waifCnt;//漂流瓶统计
    
    private Integer priority;//优先级
    
    private Integer cdbUseCnt;//充电宝被利用次数
    
    private Integer isNonuse;//该充电宝是否被停止使用
    
    private Long userNumberAccount;//用户数字账号
    
    private String describe; 
    
    private Integer isDebarLostCnt;
    
    private String lastTerminal;
    
    /**
     *  默认构造方法,构造一个默认的ChongdianbaoModelBase对象
     */
    public ChongdianbaoModelBase(){
    }

    /**
     *  构造函数
     *  @param rs 数据库查询结果集
     */
    public ChongdianbaoModelBase(ResultSet rs){
           try{
               this.id = rs.getInt("id");
               this.deviceId = rs.getInt("deviceId");
               this.capacity = rs.getInt("capacity");
               this.imei = rs.getString("imei");
               this.devicePosition = rs.getString("devicePosition");
               this.checkout = rs.getInt("checkout");
               this.status = rs.getInt("status");
               this.checkoutUserId = rs.getInt("checkoutUserId");
               this.addTime = rs.getDate("addTime");
               this.updateTime = rs.getDate("updateTime");
               this.vtmp = rs.getInt("vtmp");
               this.vstatus = rs.getInt("vstatus");
               this.waifCnt = rs.getInt("waifCnt");
               this.priority = rs.getInt("priority");
               this.cdbUseCnt = rs.getInt("cdbUseCnt");
               this.isNonuse = rs.getInt("isNonuse");
               this.isDebarLostCnt = rs.getInt("isDebarLostCnt");
               this.lastTerminal = rs.getString("lastTerminal");
           }catch(Exception e) {
              e.printStackTrace(); 
           }
    }

    public String getLastTerminal() {
		return lastTerminal;
	}

	public void setLastTerminal(String lastTerminal) {
		this.lastTerminal = lastTerminal;
	}

	public Integer getIsDebarLostCnt() {
		return isDebarLostCnt;
	}

	public void setIsDebarLostCnt(Integer isDebarLostCnt) {
		this.isDebarLostCnt = isDebarLostCnt;
	}

	public String getDescribe() {
		return describe;
	}

	public void setDescribe(String describe) {
		this.describe = describe;
	}

	public Long getUserNumberAccount() {
		return userNumberAccount;
	}

	public void setUserNumberAccount(Long userNumberAccount) {
		this.userNumberAccount = userNumberAccount;
	}

	public Integer getIsNonuse() {
		return isNonuse;
	}

	public void setIsNonuse(Integer isNonuse) {
		this.isNonuse = isNonuse;
	}

	public Integer getCdbUseCnt() {
		return cdbUseCnt;
	}

	public void setCdbUseCnt(Integer cdbUseCnt) {
		this.cdbUseCnt = cdbUseCnt;
	}

	public Integer getPriority() {
		return priority;
	}

	public void setPriority(Integer priority) {
		this.priority = priority;
	}

	public Integer getWaifCnt() {
		return waifCnt;
	}

	public void setWaifCnt(Integer waifCnt) {
		this.waifCnt = waifCnt;
	}

	/**
     * 设置属性id<br>
     * @param id 待设置的属性id的值
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取属性id<br>
     * @return 属性id的值
     */
    public Integer getId() {
        return id;
    }

    /**
     * 设置属性deviceId<br>
     * @param deviceId 待设置的属性deviceId的值
     */
    public void setDeviceId(Integer deviceId) {
        this.deviceId = deviceId;
    }

    /**
     * 获取属性deviceId<br>
     * @return 属性deviceId的值
     */
    public Integer getDeviceId() {
        return deviceId;
    }

    /**
     * 设置属性设备号<br>
     * 含义:设备号<br>
     * @param imei 待设置的属性设备号的值
     */
    public void setImei(String imei) {
        this.imei = imei;
    }

    /**
     * 获取属性设备号<br>
     * 含义:设备号<br>
     * @return 属性设备号的值
     */
    public String getImei() {
        return imei;
    }

    /**
     * 设置属性借出次数<br>
     * 含义:借出次数<br>
     * @param checkout 待设置的属性借出次数的值
     */
    public void setCheckout(Integer checkout) {
        this.checkout = checkout;
    }

    /**
     * 获取属性借出次数<br>
     * 含义:借出次数<br>
     * @return 属性借出次数的值
     */
    public Integer getCheckout() {
        return checkout;
    }

    /**
     * 设置属性1表示可借  2借出 3表示损坏<br>
     * 含义:1表示可借  2借出 3表示损坏<br>
     * @param status 待设置的属性1表示可借  2借出 3表示损坏的值
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 获取属性1表示可借  2借出 3表示损坏<br>
     * 含义:1表示可借  2借出 3表示损坏<br>
     * @return 属性1表示可借  2借出 3表示损坏的值
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设置属性目前再借的人<br>
     * 含义:目前再借的人<br>
     * @param checkoutUserId 待设置的属性目前再借的人的值
     */
    public void setCheckoutUserId(Integer checkoutUserId) {
        this.checkoutUserId = checkoutUserId;
    }

    /**
     * 获取属性目前再借的人<br>
     * 含义:目前再借的人<br>
     * @return 属性目前再借的人的值
     */
    public Integer getCheckoutUserId() {
        return checkoutUserId;
    }

    /**
     * 设置属性addTime<br>
     * @param addTime 待设置的属性addTime的值
     */
    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    /**
     * 获取属性addTime<br>
     * @return 属性addTime的值
     */
    public Date getAddTime() {
        return addTime;
    }

    /**
     * 设置属性updateTime<br>
     * @param updateTime 待设置的属性updateTime的值
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取属性updateTime<br>
     * @return 属性updateTime的值
     */
    public Date getUpdateTime() {
        return updateTime;
    }


    /**
     * 比较两个对象在逻辑上是否相等
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof ChongdianbaoModelBase)) {
            return false;
        }

        final ChongdianbaoModelBase otherModel = (ChongdianbaoModelBase) other;
        if (getId()!=null && !getId().equals(otherModel.getId())) {
            return false;
        }
        return true;
    }

    /**
     * 根据主键生成HashCode
     * @see java.lang.Object#hashCode()
     */
    public int hashCode() {
        StringBuffer buffer = new StringBuffer();
        buffer.append('|').append(id);
        return buffer.toString().hashCode();
    }

	public Integer getCapacity() {
		return capacity;
	}

	public void setCapacity(Integer capacity) {
		this.capacity = capacity;
	}

	public String getDevicePosition() {
		return devicePosition;
	}

	public void setDevicePosition(String devicePosition) {
		this.devicePosition = devicePosition;
	}

	public Integer getVtmp() {
		return vtmp;
	}

	public void setVtmp(Integer vtmp) {
		this.vtmp = vtmp;
	}

	public Integer getVstatus() {
		return vstatus;
	}

	public void setVstatus(Integer vstatus) {
		this.vstatus = vstatus;
	}
}
